# -*- coding: utf-8 -*-
# @Time    : 2021-03-18 20:02
# @Author  : Joye
# @Email   : 1272208362@qq.com
# @File    : 2021-03-18-duanjiayi.py

x=11
print(20<x<30 or x<-100)


y=5;
if y%2==1:
    print("y是奇数")


a = 8;b =47
print(a%b+a/b*b == a)



str1 = "aaasdabccb"
print("abc" in str1)


a=127>>2
print(a)


print(3 or print("5") and not print("abc"))


#NO.1
a, b = 5, 7
print(1+a/b)

#NO.2
x, y, z = 3, 10, 9
ex = x<z or y<z
print(ex)

#NO.3
# 循环12次,字符串拼接，随机生成一个数t，if判断d[t-1]是否亮（1-亮，0-灰），即判断玩家是否赢得比赛
import random
t = 12
d = str(random.randint(0,1))
while t>1:
    c = random.randint(0,1)
    t-=1
    d =d + str(c)
print("亮灯情况：",d)
t = random.randint(1,12)
print("你打到了第%d个灯" % t)
if int(d[t-1]):
    print("游戏结果 True")
else:
    print("游戏结果 False")
